package common;

import java.util.ArrayList;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;



@XmlRootElement(name = "Result")
public class JobResultObject {
	
	private String from;
	private String type;
	private Long timestamp;
	private JobObject job = new JobObject();
    private int NumberOfOutputFiles;
    private ArrayList<FileObject> files = new ArrayList<FileObject>();
    private WorkerObject worker = new WorkerObject();
	
	@XmlAttribute
	public String getFrom() {
		return from;
	}
	public void setFrom(String from) {
		this.from = from;
	}
	@XmlAttribute
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public Long getTimestamp() {
		return timestamp;
	}
	public void setTimestamp(Long timestamp) {
		this.timestamp = timestamp;
	}
	public JobObject getJob() {
		return job;
	}
	public void setJob(JobObject job) {
		this.job = job;
	}
	public int getNumberOfOutputFiles() {
		return NumberOfOutputFiles;
	}
	public void setNumberOfOutputFiles(int numberOfOutputFiles) {
		NumberOfOutputFiles = numberOfOutputFiles;
	}
	public ArrayList<FileObject> getFiles() {
		return files;
	}
	public void setFiles(ArrayList<FileObject> files) {
		this.files = files;
	}
	public void addFile(FileObject file) {
		files.add(file);
	}
    public void removeFile(FileObject file) {
    	files.remove(file);
	}
	public WorkerObject getWorker() {
		return worker;
	}
	public void setWorker(WorkerObject worker) {
		this.worker = worker;
	}
}